﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Drawing;
using System.Configuration;

namespace Wicresoft.UnifyShow2.Portal.Extensions
{
    public static class GlobalHelper
    {
        public static int Width = 375;
        public static int Height = 220;
        public static int Width2 = 180;
        public static int Height2 = 160;
        public static int Width3 = 650;
        public static int Height3 = 160;
        //颜色
        public static Color[] OneSet = new Color[1] { Color.FromArgb(0, 148, 112) };
        public static Color[] TwoSetBar = new Color[2] { Color.FromArgb(62, 106, 153), Color.FromArgb(240, 165, 84) };
        public static Color[] TwoSetSLA = new Color[2] { Color.FromArgb(2, 224, 42), Color.FromArgb(232, 2, 0) };
        public static Color[] TwoSetPei = new Color[2] { Color.FromArgb(68, 130, 207), Color.FromArgb(203, 64, 59) };
        public static Color[] SixColorSet = new Color[6] { Color.FromArgb(144, 180, 12), Color.FromArgb(127, 93, 170), Color.FromArgb(68, 130, 207), Color.FromArgb(203, 64, 59), Color.FromArgb(0, 148, 112), Color.FromArgb(62, 106, 153) };
        //字体
        public static Font fontTitle = new Font("Microsoft YaHei", 14, FontStyle.Regular);
        public static Font fontTitletoSLA = new Font("Microsoft YaHei", 10, FontStyle.Regular);
        public static Font fontLegend = new Font("Microsoft YaHei", 8, FontStyle.Regular);
        //默认起止时间
        public static DateTime starTime = Convert.ToDateTime("2012/05/01");
        public static DateTime endTime = Convert.ToDateTime("2012/12/30");

        public static int Escalations(int? sid)
        {
            //为省局返回0
            if (sid == 101)
            {
                return 0;
            }
            //不为省局返回1
            else
            {
                return 1;
            }
        }

        public static List<string> DeviceTypes = new List<string>() { "服务器", "数据库", "中间件" };
        public static string SelfUrl = ConfigurationManager.AppSettings["SelfUrl"];
        public static string ITSMURL = ConfigurationManager.AppSettings["ITSMURL"];
        public static string ReportURL = ConfigurationManager.AppSettings["ReportURL"];
    }
}